<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>Promise testDemo</title>
	<style type="text/css">
	* {
		padding: 0;
		margin: 0;
	}
	
</style>
</head>
<body>
	<h1>aaaa</h1>
</body>
<script src="index.js"></script>
<script type="text/javascript">


// # 再试试把上面两行放在 setTimeout里
setTimeout(() => {
  console.log('-----------------------\n')
  console.log(p1); // Promise {<resolved>}
  console.log(p2); // Promise {<resolved>}
});


let p1 = new Promise(resolve => {
  resolve();
});
let p2 = p1.then(() => {
  console.log("后盾人");
  return Promise.resolve('eee')
});
p2.then(() => {
  console.log("houdunren.com");
});
console.log(p1); // Promise {<resolved>}
console.log(p2); // Promise {<pending>}



</script>
</html>